package io.gitee.zhucan123.core.infrastructure.entity;

import com.niimbot.middlend.core.infrastructure.annotation.EnumScan;
import com.niimbot.middlend.core.infrastructure.dataconversion.IntegerEnum;
import lombok.AllArgsConstructor;

/**
 * @author: zhuCan
 * @date: 2019/10/11 10:50
 * @description:
 */
@AllArgsConstructor
@EnumScan(defaultEnumCode = 1)
public enum Sort implements IntegerEnum<Sort> {

  ASC(1,"正序"),

  DESC(2,"反序");

  private int code;

  private String name;
  @Override
  public Number getValue() {
    return code;
  }

  @Override
  public String attributeName() {
    return name;
  }
}
